import { createApp } from "vue";

import App from "./App.vue";
import router from "./router";
import store from "./store";
// * as xxx => 引入 模块中所有的具名导出，将其组装到 xxx 的对象中

// 引入所有 图标
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

// 引入全局初始化样式
import "normalize.css";

// 引入自己编写的全局样式
import "@/styles/base.scss";

// ElMessage 消息，需要手动引入样式
import "element-plus/es/components/message/style/css";

const app = createApp(App);

// 将所有的图标都注册成全局组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(router);

app.use(store);
app.config.globalProperties.$abc = "123";

app.mount("#app");
